﻿#include"game.h"
//#include"game.c"
//打印棋盘
game()
{
	char mine[ROWS][COLS];
	char board[ROWS][COLS];
	//初始化棋盘为*`				 
	Initboard(board, ROWS, COLS, '*');//初始化为*
	Initmine(mine, ROWS, COLS, '0');//初始化为‘0’
	//生成地雷
	Creat_mine(mine, ROW, COL);
	//打印棋盘
	Show_board(board, ROW, COL);
	//打印雷图
	//Show_mine_board(mine, ROW, COL);
	//输入坐标判断地雷位置

	Find_mine(board, mine, ROW, COL);
	
	//Show_board_(board, ROW, COL);
}
//程序运行逻辑
void menu(void)
{
	printf("(*’(OO)’*)(／￣(ｴ)￣)／Ｕ^皿^Ｕ(〓￣(∵エ∵)￣〓)\n");
	printf("扫~雷~游~戏~\n");
	printf("***********************\n");
	printf("******  1.start  ******\n");
	printf("******  0.exit   ******\n");
	printf("***********************\n");

}
int main()
{
	int input = 0;
	do
	{
		//生成随机数
		srand((unsigned int)time(NULL));
		menu();
		int q = scanf("%d", &input);
		printf("请选择>\n");
	switch(input)
		{
		case 1:
			{
				game();
				break;
			}
		case 0:
			{
				break;
			}
		default:
			{
				break;
			}
		}
	} while (input);
	return 0;
}